﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Planer.Model.Validators.Base;

namespace Planer.Model.Validators
{
    public class ActionCategoryValidator : Validator<action_category>
    {
        public override void Validate(action_category ActionCategory)
        {
            if (ActionCategory == null) throw new ArgumentNullException("Bill", NULL_ARGUMENT_MESSAGE);

            NameValidator nameValidator = new NameValidator();
            nameValidator.Validate(ActionCategory.name);
            if (nameValidator.Status == OperationStatusType.ERROR)
            {
                this.status = OperationStatusType.ERROR;
                this.errors.AddRange(nameValidator.Errors);
            }
        }
    }
}
